home *** CD-ROM | disk | FTP | other *** search
-
- /******************************************************************************
-
- MODULE
- Messages.c
-
- DESCRIPTION
- XDME User Dialogs Module
-
- The Messages module shall support automatically
- generated lists of strings, externally accessible
- via a "const char ..." directive, in order to be
- able to add Locale support for XDME
-
- the way to produce that list is:
- * each used string must be named and put into a DEFMESSAGE-Makro,
- e.g.
- $ DEFMESSAGE(__hello_world, "Hello world!\n")
- $ error(__hello_world);
- instead of just
- $ error("Hello world!");
- * from CLI/Make commands like the following must be performed:
- > GREP -h ^DEFMESSAGE ...>t:messages.1
- (we are using EXTRACTER (included in the Package) instead)
- > SORT from t:messages.1 t:messages.2
- (Workbench supports a SORT command)
- > UNIQ t:messages.1 >include/messages.h
- (UNIQ will be included into XDME; there are many implementations around)
- > DELETE t:messages.?
- (Workbench supports a DELETE command)
- that way we do generate a list of all used strings
- * lines like the following must be added to a global include file
- $ #undef DEFMESSAGE
- $ #define DEFMESSAGE(name,value) extern char *name;
- $ #include "messages.h"
- $ #undef DEFMESSAGE
- $ #define DEFMESSAGE(name,value)
- * the file "messages.c" must be added to the Source tree;
- the dependency
- $(OBJDIR)messages.o : $(SRCDIR)messages.c $(InCDIR)messages.h
- must be added to the Makefile.
-
- NOTES
- there is currently no way to ensure the order of
- the used strings, for that reason, we have not yet
- decided how to create a stable Locale-catalog.
- for the same reason, this mdule does currently not
- call any function, it just exports some strings...
-
- BUGS
- since uniq does check full lines, there is currently no
- gurantee, that no symbol is defined twice, so compilation
- for the module might fail; in such a case, user must search
- in $(INCDIR)messages.h for duplicate names and change them
- in their defining Files manually...
-
- TODO
- tell me
-
- EXAMPLES
-
- SEE ALSO
- Command.c (similar mechanism is used to create the Commandtree)
- Vars.c (same mechanism is used to build the List of vartrees)
-
- INDEX
-
- HISTORY
- 01-10-94 b_noll created
-
- ******************************************************************************/
-
-
- /**************************************
- Includes
- **************************************/
-
-
- /**************************************
- Global Variables
- **************************************/
-
- #define DEFMESSAGE(n,v) const char *(n) = (v);
- #include "gen_messages.h"
-
- /******************************************************************************
- ***** END Messages.c
- ******************************************************************************/
-
-